From: Carlos Garnacho Date: Fri, 12 Sep 2025 13:28:09 +0000 (+0200) Subject: pointerA11yTimeout: Protect against destroyed PieTimer actor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~95^2^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d06f1895187e67ee96d36d787c45e0d93a3aa050;p=gnome-shell.git pointerA11yTimeout: Protect against destroyed PieTimer actor This trigger an exception if the PieTimer destroys itself before the ClutterSeat::ptr-a11y-timeout-stopped signal triggers. It's unlikely to happen now with the fixed arguments, but still makes sense for correctness. Part-of: --- diff --git a/js/ui/pointerA11yTimeout.js b/js/ui/pointerA11yTimeout.js index 6a9ceca66..a3af452f0 100644 --- a/js/ui/pointerA11yTimeout.js +++ b/js/ui/pointerA11yTimeout.js @@ -118,6 +118,7 @@ export class PointerA11yTimeout { this._pieTimer = new PieTimer(); Main.uiGroup.add_child(this._pieTimer); Main.uiGroup.set_child_above_sibling(this._pieTimer, null); + this._pieTimer.connect('destroy', () => (this._pieTimer = null)); this._pieTimer.start(x, y, timeout); @@ -127,7 +128,7 @@ export class PointerA11yTimeout { seat.connect('ptr-a11y-timeout-stopped', (o, type, clicked) => { if (!clicked) - this._pieTimer.destroy(); + this._pieTimer?.destroy(); if (type === Clutter.PointerA11yTimeoutType.GESTURE) global.display.set_cursor(Meta.Cursor.DEFAULT);